Skip to content

[pull] master from scrapinghub:master#80

Merged
pull[bot] merged 1 commit into
zanachka:masterfrom
scrapinghub:master
Apr 9, 2026
Merged

[pull] master from scrapinghub:master#80
pull[bot] merged 1 commit into
zanachka:masterfrom
scrapinghub:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 9, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* Remove fastText support and enable numpy 2.x compatibility

FastText library has been archived since March 2024 and is no longer
maintained. This dependency was blocking numpy 2.x adoption.

Changes:
- Remove fasttext extra from setup.py dependencies
- Add deprecation warnings to fasttext.py module
- Update documentation to recommend langdetect as primary option
- Update CLI to deprecate --fasttext flag
- Add comprehensive test suite for langdetect integration
- Remove fasttext from tox.ini test configurations

Users should migrate to langdetect:
  pip install dateparser[langdetect]

Closes #1287
Closes #1251

* Update dateparser_cli/cli.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dateparser/custom_language_detection/fasttext.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Simplify fasttext deprecation to always error

The previous approach was confusing:
- If fasttext was installed, it showed a warning but still worked
- If fasttext wasn't installed, it raised an ImportError

This creates inconsistent deprecation - users don't know if the
feature is truly deprecated or not.

Now the module:
- Always shows deprecation warning on import
- Always raises ImportError when detect_languages() is called
- Provides clear migration path to langdetect
- No functional fasttext code remains

This makes the deprecation clear and consistent.

* Remove unused module-level mock in test_language_detect

The module-level 'detect_languages' mock was defined but never used.
The MockLangDetectTest class defines its own mock as a class attribute,
and other test classes use the actual lang_detect_detect_languages function.

This cleanup removes the unused mock to avoid confusion.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Apr 9, 2026
@pull pull Bot added the ⤵️ pull label Apr 9, 2026
@pull pull Bot merged commit b72ed09 into zanachka:master Apr 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant